import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/index.css'
import zhCn from "element-plus/es/locale/lang/zh-cn";
import request from '@/utils/request'
import api from '@/api'
import util from '@/utils/utils'
//图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 获取环境变量
// console.log("环境变量=>", import.meta.env);
// createApp(App).mount('#app')
const app = createApp(App);
//全局挂载图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.config.globalProperties.$request = request // 全局挂载
app.config.globalProperties.$api = api // 全局挂载
app.config.globalProperties.$router = router
app.config.globalProperties.$util = util
app.use(router).use(ElementPlus,{locale:zhCn}).mount('#app')